<?php

namespace App\Models;

class VoucherBase extends Model
{
    protected $table = 'yf_voucher_base';
    protected $primaryKey = 'voucher_id';
    public $timestamps = false;
    protected $guarded = ['voucher_id'];

    public static function getVoucherTIdsByUserIdAsArray(int $userId) : array
    {
        return self::whereVoucherOwnerId($userId)->pluck('voucher_t_id')->toArray();
    }
}
